<!--
 * @Descripttion: 总后台框架视图
 * @Copyright: 武汉一一零七科技有限公司©版权所有
 * @Contact: QQ:2487937004
 * @Date: 2020-03-09 17:51:33
 * @LastEditors: cbing
 * @LastEditTime: 2020-05-01 22:54:19
 -->
 <!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="renderer" content="webkit">
     <title>商家管理-{$webconfig.webtitle}</title>
     <meta name="keywords" content="{$webconfig.keywords}">
     <meta name="description" content="{$webconfig.description}">
     <!--[if lt IE 9]>
     <meta http-equiv="refresh" content="0;ie.html" />
     <![endif]-->
     <link rel="shortcut icon" href="__PUBLIC__/favicon.ico"> 
     <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
     <link href="__PUBLIC__/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
     <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
     <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
     <style>
         body{
             touch-action: none; 
         }
         body.fixed-sidebar .navbar-static-side, body.canvas-menu .navbar-static-side{
             width: 170px;
         }
         #page-wrapper{
             margin-left: 170px;
         }
         .content-tabs{
             border: none;
         }
         .navbar-fixed-top, .navbar-static-top{
             /* display: none; */
         }
         #content-main {
             /* height: calc(100% - 80px); */
         }
         .navbar-form-custom{
             width: 250px;
         }
         .fa-sign-out{
             font-size: 16px;
             font-weight: bold;
             color: ;
         }
         .roll-right.btn-group{
             right: 0;
         }
         .roll-right.J_tabRight {
             right: 40px;
         }
         .roll-right.btn-group,.roll-right.btn-group button {
             width: 40px;
         }
     </style>
 </head>
 <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
     <div id="wrapper">
         <!--左侧导航开始-->
         <nav class="navbar-default navbar-static-side" role="navigation">
             <div class="nav-close"><i class="fa fa-times-circle"></i>
             </div>
             <div class="sidebar-collapse">
                 <ul class="nav" id="side-menu">
                     <li class="nav-header">
                         <div class="dropdown profile-element">
                             <span><img alt="image" class="img-logo" src="__PUBLIC__/images/logo_white.png" /></span>
                             <a data-toggle="dropdown" class="dropdown-toggle" href="#" style="display: none;">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold">{$Think.session.adminname}</strong></span>
                                <span class="text-muted text-xs block">{$Think.session.rolename}
                                    <!-- <b class="caret"></b> -->
                                </span>
                                </span>
                             </a>
                             <!-- <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                 <li><a class="J_menuItem" href="/admin/admin/edit/id/{$Think.session.admin_id}/page/1" data-index="1">修改资料</a>
                                 </li>
                             </ul> -->
                         </div>
                         <div class="logo-element">商家</div>
                     </li>
                     
                     <li>
                         <a class="J_menuItem" href="{:url('index/index_v3')}"><i class="fa fa-home"></i><span class="nav-label">主页</span></a>
                     </li>
                    
                    <li>
                        <a href="#"><i class="fa fa-bank"></i><span class="nav-label">店铺管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('shops/info')}">店铺基本信息</a></li>
                            <li><a class="J_menuItem" href="{:url('manage_cate/lst')}">店铺经营类目</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_content/info')}">商家详情信息</a></li>
                            <li><a class="J_menuItem" href="{:url('rzmessage/info')}">入驻资料信息</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_store/lst')}">商家门店管理</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_storestaff/lst')}">门店员工管理</a></li>
                            <!-- <li><a class="J_menuItem" href="{:url('shop_pic/lst')}">店铺banner图信息</a></li> -->
                            <!-- <li><a class="J_menuItem" href="{:url('shop_custom/lst')}">店铺自定义推荐位</a></li> -->
                            <li><a class="J_menuItem" href="{:url('shop_shdz/info')}">售后地址设置</a></li>
                            <li><a class="J_menuItem" href="{:url('sertion/lst')}">服务信息</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_admin/editpwd')}">修改账号密码</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_admin/addpaypwd')}">设置提现密码</a></li>
<!--                            <li><a class="J_menuItem" href="{:url('shop_admin/editphone')}">更换登录手机号</a></li>-->
                        </ul>
                    </li>
                    
                    <li>
                        <a href="#"><i class="fa fa-list-alt"></i><span class="nav-label">账户管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('shop_detail/lst')}">账户明细</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_txmx/index')}">账户提现</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_txmx/lst')}">提现明细</a></li>
                            <li><a class="J_menuItem" href="{:url('shop_bankcard/info')}">银行卡设置</a></li>
                        </ul>
                    </li>  
                    <li>
                        <a href="#"><i class="fa fa-truck"></i><span class="nav-label">配送方式</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('dispatch/lst')}">配送方式列表</a></li>
                            <li><a class="J_menuItem" href="{:url('dispatch/add')}">添加配送方式</a></li>
                        </ul>
                    </li>

                     <li>
                         <a href="#"><i class="fa fa-video-camera"></i><span class="nav-label">直播管理</span><span class="fa arrow"></span></a>
                         <ul class="nav nav-second-level">
                             <li><a class="J_menuItem" href="{:url('goods/livelst')}">直播间商品列表</a></li>
                             <li><a class="J_menuItem" href="{:url('live_commision_config/lst')}">直播分成配置</a></li>
                             <li><a class="J_menuItem" href="{:url('live_commision_config/liveGiftGive')}">礼物打赏记录</a></li>
                         </ul>
                     </li>

                     <li>
                         <a href="#"><i class="fa fa-cubes"></i><span class="nav-label">门店管理</span><span class="fa arrow"></span></a>
                         <ul class="nav nav-second-level">
                             <li><a class="J_menuItem" href="{:url('shop_store/lst')}">商家门店管理</a></li>
                             <li><a class="J_menuItem" href="{:url('shop_storestaff/lst')}">门店员工管理</a></li>
                         </ul>
                     </li>



                     <li>
                        <a href="#"><i class="fa fa-soccer-ball-o"></i><span class="nav-label">商品管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('shop_cate/lst')}">店铺商品分类</a></li>
                            <li><a class="J_menuItem" href="{:url('goods/lst')}">商品列表</a></li>
                            <li><a class="J_menuItem" href="{:url('goods/add')}">添加商品</a></li>
                        </ul>
                    </li> 
                    
                    <li>
                        <a href="#"><i class="fa fa-map-signs"></i><span class="nav-label">订单管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('order/lst')}">订单列表</a></li>
                            <li><a class="J_menuItem" href="{:url('comment/lst',array('filter'=>3))}">商品评价</a></li>
                        </ul>
                    </li> 
                    <li>
                        <a href="#"><i class="fa fa-diamond"></i><span class="nav-label">售后管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('th_apply/lst')}">售后订单列表</a></li>
                        </ul>
                    </li>

                    <li>
                        <a href="#"><i class="fa fa-ticket"></i><span class="nav-label">营销中心</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('coupon/lst')}">优惠券</a></li>
                            <li><a class="J_menuItem" href="{:url('seckill/lst')}">秒杀活动</a></li>
                            <li>
                                <a href="#"><span class="nav-label">拼团活动</span><span class="fa arrow"></span></a>
                                <ul class="nav nav-second-level">
                                    <li><a class="J_menuItem" style="margin-left: 14px" href="{:url('assemble/lst')}">拼团商品列表</a></li>
                                    <li><a class="J_menuItem" style="margin-left: 14px" href="{:url('assemble/orderAssemble')}">拼团活动列表</a></li>
                                </ul>
                            </li>
                            <li><a class="J_menuItem" href="{:url('promotion/lst')}">商品促销活动</a></li>
                        </ul>
                    </li>

                     <li>
                         <a href="#"><i class="fa fa-ticket"></i><span class="nav-label">积分管理</span><span class="fa arrow"></span></a>
                         <ul class="nav nav-second-level">
                             <li><a class="J_menuItem" href="{:url('IntegralShop/lst')}">积分商城</a></li>
                         </ul>
                     </li>

                    <li>
                        <a href="#"><i class="fa fa-users"></i><span class="nav-label">会员管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('member/blacklst')}">拉黑列表</a></li>
                        </ul>
                    </li>
                    
                    <li>
                        <a href="#"><i class="fa fa-flag"></i><span class="nav-label">新品首发</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a class="J_menuItem" href="{:url('new_publish/lst')}">新品列表</a></li>
                            <li><a class="J_menuItem" href="{:url('new_publish/add')}">发布新品</a></li>
                        </ul>
                    </li>
                     <li>
                         <a href="#"><i class="fa fa-video-camera"></i><span class="nav-label">短视频</span><span class="fa arrow"></span></a>
                         <ul class="nav nav-second-level">
                             <li><a class="J_menuItem" href="{:url('video/lst')}">短视频列表</a></li>
                             <li><a class="J_menuItem" href="{:url('video/add')}">上传短视频</a></li>
                         </ul>
                     </li>

                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <!-- <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a> -->
                        
                        <form role="search" class="navbar-form-custom">
                            <div class="form-group">
                                <p class="form-control" id="top-search" style="line-height:49px;"><i class="fa fa-tv"></i> {$webconfig.webtitle}·商家管理</p>
                            </div>
                        </form>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
<!--                            <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#" aria-expanded="false">-->
<!--                                <i class="fa fa-bell"></i> <span class="label label-primary">8</span>-->
<!--                            </a>-->
                            <ul class="dropdown-menu dropdown-alerts">
                                <li>
                                    <a class="J_menuItem" href="{:url('order/lst','filter=1')}">
                                        <div>
                                            <i class="fa fa-comment fa-fw"></i> 待发货订单
                                            <span class="pull-right text-muted small">25个</span>
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a class="J_menuItem" href="{:url('order/lst','filter=4')}">
                                        <div>
                                            <i class="fa fa-commenting fa-fw"></i> 待付款订单
                                            <span class="pull-right text-muted small">5个</span>
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a class="J_menuItem" href="{:url('th_apply/lst','filter=1')}">
                                        <div>
                                            <i class="fa fa-commenting fa-fw"></i> 售后申请订单
                                            <span class="pull-right text-muted small">5个</span>
                                        </div>
                                    </a>
                                </li>
                                <li class="divider"></li>
                                <li>
                                    <div class="text-center link-block">

                                        <a class="J_menuItem" href="{:url('order/lst')}" data-index="89">

                                            <strong>查看所有 </strong>

                                            <i class="fa fa-angle-right"></i>

                                        </a>

                                    </div>

                                </li>

                            </ul>

                        </li>
                        
                        <li class="dropdown hidden-xs">
                            <a href="{:url('login/loginout')}" class="right-sidebar-toggle" aria-expanded="false">
                                <!-- <i class="fa fa-power-off"></i>  -->
                                <i class="fa fa fa-sign-out"></i> 退出
                            </a>
                        </li>
                        <!-- <li class="dropdown hidden-xs">
                            <a class="right-sidebar-toggle" aria-expanded="false">
                                <i class="fa fa-tasks"></i> 主题
                            </a>
                        </li> -->
                    </ul>
                </nav>
            </div>
            <!-- <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs">
                    <div class="page-tabs-content" style="margin-left: 0px;">
                        
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
                <div class="btn-group roll-nav roll-right">

                    <button class="dropdown J_tabClose" data-toggle="dropdown" aria-expanded="false"><span class="fa fa-close"></span>
                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li class="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                        <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
            </div> -->
            
            <div class="row J_mainContent" id="content-main">
                <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url('index_v3')}" frameborder="0" data-id="index_v3.html" seamless></iframe>
            </div>
            
            <div class="footer">
                <div class="text-center">{$webconfig.web_banquan}</div>
            </div>
        </div>
        <!--右侧部分结束-->
        <!--右侧边栏开始-->
        <!-- <div id="right-sidebar">
            <div class="sidebar-container">

                <ul class="nav nav-tabs navs-3">

                    <li class="active">
                        <a data-toggle="tab" href="#tab-1">
                            <i class="fa fa-gear"></i> 主题
                        </a>
                    </li>
                </ul>

                <div class="tab-content">
                    <div id="tab-1" class="tab-pane active">
                        <div class="sidebar-title">
                            <h3> <i class="fa fa-comments-o"></i> 主题设置</h3>
                            <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式，这些设置会被保存在本地，下次打开的时候会直接应用这些设置。</small>
                        </div>
                        <div class="skin-setttings">
                            <div class="title">主题设置</div>
                            <div class="setings-item">
                                <span>收起左侧菜单</span>
                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox" id="collapsemenu">
                                        <label class="onoffswitch-label" for="collapsemenu">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="setings-item">
                                <span>固定顶部</span>

                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox" id="fixednavbar">
                                        <label class="onoffswitch-label" for="fixednavbar">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="setings-item">
                                <span>
                        固定宽度
                    </span>

                                <div class="switch">
                                    <div class="onoffswitch">
                                        <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox" id="boxedlayout">
                                        <label class="onoffswitch-label" for="boxedlayout">
                                            <span class="onoffswitch-inner"></span>
                                            <span class="onoffswitch-switch"></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="title">皮肤选择</div>
                            <div class="setings-item default-skin nb">
                                <span class="skin-name ">
                         <a href="#" class="s-skin-0">
                             默认皮肤
                         </a>
                    </span>
                            </div>
                            <div class="setings-item blue-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-1">
                            蓝色主题
                        </a>
                    </span>
                            </div>
                            <div class="setings-item yellow-skin nb">
                                <span class="skin-name ">
                        <a href="#" class="s-skin-3">
                            黄色/紫色主题
                        </a>
                    </span>
                            </div>
                        </div>
                    </div>
					
                </div>

            </div>
        </div> -->
        <!--右侧边栏结束-->

    </div>

    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/admin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
    <!-- 自定义js -->
    <script src="__PUBLIC__/admin/js/hplus.js?v=4.1.0"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/contabs.js"></script>
    <!-- 第三方插件 -->
    <script src="__PUBLIC__/admin/js/plugins/pace/pace.min.js"></script>
    <script src="__PUBLIC__/admin/js/layui/layui.js"></script>
    <script src="__PUBLIC__/admin/js/heartbeat.js"></script>

    <script>
        var token = '{$Request.session.shopsh_token}';
        var avatar = '/{$Request.session.shopsh_logo}';
        var nickname = '{$Request.session.shopsh_name}';
        layui.use('layim', function(layim){
            //基础配置
            // let websocketHeartbeatJs = new window.WebsocketHeartbeatJs({
            //     url: 'wss:app.xiaoqu9.com:8989/',
            //     pingTimeout: 15000,
            //     pongTimeout: 7000,
            //     reconnectTimeout: 2000,
            //     pingMsg: JSON.stringify({
            //         type: 'ping',
            //         id: token
            //     })
            // })
            // websocketHeartbeatJs.onopen = function() {
            //     console.log('open success');
            // }
            // websocketHeartbeatJs.onmessage = function(res) {
            //     let data = JSON.parse(res.data)
            //     if (data.type === 'init') {
            //         websocketHeartbeatJs.send(JSON.stringify({
            //             type: 'bind_id',
            //             id: token,
            //             client_id: data.data.client_id
            //         }))
            //     }

            //     if (data.type === 'say') {
            //         var msg = data.data.message_type === 'img' ? 'img[' + data.data.message + ']' : data.data.message;
            //         console.log(msg)
            //         layim.getMessage({
            //             username: data.data.from_username
            //             ,avatar: data.data.from_headimgurl //消息来源用户头像
            //             ,id:  data.data.fromid //消息的来源ID（如果是私聊，则是用户id，如果是群聊，则是群组id）
            //             ,type: "friend" //聊天窗口来源类型，从发送消息传递的to里面获取
            //             ,content: msg //消息内容
            //             ,mine: false //是否我发送的消息，如果为true，则会显示在右方
            //             ,timestamp: 1467475443306 //服务端时间戳毫秒数。注意：如果你返回的是标准的 unix 时间戳，记得要 *1000
            //         })
            //     }


            //     if (data.type === 'bind_id') {
            //         websocketHeartbeatJs.send(JSON.stringify({
            //             type: 'chatlist',
            //             data: {
            //                 fromid: token
            //             }
            //         }))
            //     }

            //     if (data.type === 'chatlist') {
            //         var list = data.data.map(function(item) {
            //             var id = item.fromid === token ? item.toid : item.fromid
            //             var username = item.fromid === token ? item.to_username : item.from_username
            //             var avatar = item.fromid === token ? item.to_headimgurl : item.from_headimgurl
            //             return {
            //                 "username": username
            //                 ,"id": id
            //                 ,"avatar": avatar
            //                 ,"sign": "这些都是测试数据，实际使用请严格按照该格式返回"
            //                 ,"status": "online"
            //             }
            //         })
            //         layim.config({
            //             notice: true,
            //             isgroup: false,
            //             isfriend: true,
            //             init: {
            //                 "mine": {
            //                     "username": nickname,
            //                     "id": token,
            //                     "status": "online",
            //                     "sign": "在深邃的编码世界，做一枚轻盈的纸飞机",
            //                     "avatar": avatar
            //                 },
            //                 "friend": [{
            //                     "groupname": "客户",
            //                     "id": 1,
            //                     "list": list
            //                 }]
            //             },
            //             title: '客服一号'

            //             //上传图片接口（返回的数据格式见下文），若不开启图片上传，剔除该项即可
            //             ,uploadImage: {
            //                 url: 'https://慧翼云管家.s1107.net/index.php/api/find/huploadspic' //接口地址
            //                 ,type: 'post' //默认post
            //             },

            //             chatLog: layui.cache.dir + 'css/modules/layim/html/chatlog.html'
            //         });
            //     }

            // }
            // websocketHeartbeatJs.onreconnect = function() {
            //     console.log('reconnecting...');
            // }
            // layim.on('sendMessage', function(res){
            //     console.log(res, 11)
            //     if (res.mine.content.indexOf('img[http') === 0) {
            //         console.log(222)
            //         websocketHeartbeatJs.send(JSON.stringify({
            //             type: 'say',
            //             data: {
            //                 fromid: token,
            //                 message: res.mine.content.substr(4, res.mine.content.length- 5),
            //                 message_type: "img",
            //                 toid: res.to.id,
            //                 userType: "home"
            //             }
            //         }));
            //     } else {
            //         websocketHeartbeatJs.send(JSON.stringify({
            //             type: 'say',
            //             data: {
            //                 fromid: token,
            //                 message: res.mine.content,
            //                 message_type: "text",
            //                 toid: res.to.id,
            //                 userType: "home"
            //             }
            //         }));
            //     }
            // });
        });
    </script>
</body>
</html>
